package com.my.controller;

import com.my.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping("/findAllUser")
    public ModelAndView findAllUser(ModelAndView mv){
        mv.setViewName("ok");
        mv.addObject("allUser",userService.findAllUser());
        return mv;
    }

}
